import os, sys

# 把包的父目录添加到系统搜索路径
BASE_DIR=os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(BASE_DIR)

from base_data_structures.deque import Deque

# 利用双端队列判断回文
def palchecker(eString):
    chardeque = Deque()
    for ch in eString:
        chardeque.addRear(ch)
    match = True
    while chardeque.size()>1 and match:
        if chardeque.removeFront() != chardeque.removeRear():
            match = False
    return match
    # return chardeque.items

    
print(palchecker('radar'))